package com.sgcc.ln.pmos.e_ln_mall.presenter;

import com.sgcc.ln.pmos.common.bean.ComputationBean;
import com.sgcc.ln.pmos.common.http.HttpInterConst;
import com.sgcc.ln.pmos.common.http.HttpRequestUtils;
import com.sgcc.ln.pmos.common.http.MvcNetCallback;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class PredictPriceHttp {


    /**
     * @param calIdList            packID,组合套餐ID
     * @param calDate              数据源日期
     * @param priceType            1历史价格  2综合价格
     * @param subEnergyType        第一位 分时1不分时0，第二位 约定1不约定0，看复杂程度，取最复杂，有分时，取分时，有约定，取约定
     * @param deviationRatio       偏差比例，不分时约定，需要输入一个比例
     * @param realEnergyRatioList  ？？ subEnergyType == 10 传
     * @param agreeEnergyRatioList 24小时用电占比集合（分时）
     * @param deviationRatioList   24小时偏差占比集合（分时约定）
     */
    public static void price(List<String> calIdList, String calDate, int priceType, String subEnergyType,
                             String deviationRatio, List<String> realEnergyRatioList,
                             List<String> agreeEnergyRatioList, List<String> deviationRatioList, MvcNetCallback<ComputationBean> netCallback) {

//        {
//            "calIdList": [
//            "a1445b29770c4e7d9493d00c0514bd5c"], //packID,组合套餐ID
//            "calDate": "2022-08", //数据源日期
//                "calType": "4", //代表商品对比
//                "subEnergyType": "11", //分时1不分时0，约定1约定0，看复杂程度，取最复杂，有分时，取分时，有约定，取约定
//                "deviationRatio": "", //偏差比例，不分时约定，需要输入一个比例
//                "realEnergyRatioList": [], //分时不约定，24时段
//            "agreeEnergyRatioList": [0.04167, "0.95833", "0", "0", "0", "0", "0", "0", "0", "0", "0",
//                "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], //24小时用电占比集合（分时）
//            "deviationRatioList": [
//            "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
//                    "0", "0", "00", "0", "0", "0", "0", "0", "0", "0", "0", "0"] //24小时偏差占比集合（分时约定）
//        }
        Map<String, Object> params = new HashMap<>();
        params.put("calIdList", calIdList);
        params.put("calDate", calDate);
        params.put("calType", 4);
        params.put("priceType", priceType);
        params.put("subEnergyType", subEnergyType);
        params.put("deviationRatio", deviationRatio);
        params.put("realEnergyRatioList", realEnergyRatioList);
        params.put("agreeEnergyRatioList", agreeEnergyRatioList);
        params.put("deviationRatioList", deviationRatioList);

        HttpRequestUtils.getInstance().request(params, HttpInterConst.COMPUTATION, netCallback);


    }


}
